import Vue from 'vue'
import Router from 'vue-router'
import Hello from '@/components/Hello'
import WeChat from '@/components/WeChat'
import Connect from '@/components/Connect'
import Find from '@/components/Find'
import Me from '@/components/Me'

// 上面八个
import Fresh from '@/components/Fresh'
import Greens from '@/components/Greens'
import Egg from '@/components/Egg'
import Chang from '@/components/Chang'
import Frozen from '@/components/Frozen'
import Bar from '@/components/Bar'
import Clean from '@/components/Clean'
import House from '@/components/House'
// 首页 更多按钮切换
import Search from '@/components/Search'
import Morecz from '@/components/Morecz'
import Fruit from '@/components/Fruit'
import Cake from '@/components/Cake'
import Oil from '@/components/Oil'
// 详情页面
import Detailpage from '@/components/Detailpage'
// 购物车
import Gouwuche from '@/components/Gouwuche'
// 地址管理
import Dizgl from '@/components/Dizgl'
// 新增地址
import Newadd from '@/components/Newadd'

// 登录页面
import Login from '@/components/login'
import Set from '@/components/set'
import About from '@/components/about'
import Register from '@/components/register'


//分类
import Xiang from '@/components/Xiang'
import Mei from '@/components/Mei'
import Detailpage1 from '@/components/Detailpage1'





Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/wechat',
      name: 'Wechat',
      component: WeChat,
    },
     {
      path: '/connect',
      name: 'Connect',
      component: Connect
    },
    {
      path: '/xiang',
      name: 'Xiang',
      component: Xiang
    },
    {
      path: '/mei',
      name: 'Mei',
      component: Mei
    },
     {
      path: '/find',
      name: 'Find',
      component: Find
    },
     {
      path: '/me',
      name: 'Me',
      component: Me
      
    },
    // 上面八个
    {
      path:"/fresh",
      name:"Fresh",
      component: Fresh
    },
    
    {
      path:"/greens",
      name:"Greens",
      component: Greens
    },
    
    {
      path:"/egg",
      name:"Egg",
      component: Egg
    },
    
    {
      path:"/chang",
      name:"Chang",
      component: Chang
    },
    {
      path:"/frozen",
      name:"Frozen",
      component: Frozen
    },
    
    {
      path:"/bar",
      name:"Bar",
      component: Bar
    },
    {
      path:"/clean",
      name:"Clean",
      component: Clean
    },
    {
      path:"/house",
      name:"House",
      component: House
    },
    // 首页更多按钮 路由
    {
          path:"/search",
          name:"Search",
          component: Search
    },
    {
          path:"/fruit",
          name:"Fruit",
          component: Fruit
    },
     {
          path:"/morecz",
          name:"Morecz",
          component: Morecz
    },
    {
          path:"/cake",
          name:"Cake",
          component: Cake
    },
    {
          path:"/oil",
          name:"Oil",
          component: Oil
    },
    // 详情页路由
    {
          path:"/detailpage",
          name:"Detailpage",
          component: Detailpage
    },
    {
          path:"/detailpage1",
          name:"Detailpage1",
          component: Detailpage1
    },
    // 购物车
    {
      path: '/gouwuche',
      name: 'Gouwuche',
      component: Gouwuche
    },
    // 地址管理
    {
      path: '/dizgl',
      name: 'Dizgl',
      component: Dizgl
    },
    // 新增地址
    {
      path: '/newadd',
      name: 'Newadd',
      component: Newadd
    },
    
    {
        path:'/login',
        name:'Login',
        component:Login
      },
      {
        path:'/about',
        name:'About',
        component:About
      },
      {
        path:'/set',
        name:'Set',
        component:Set
      },
      {
        path:'/register',
        name:'Register',
        component:Register
      },
     {

      path: '*',
      redirect:"/Wechat"
    }
    
  ]
})
